import http from "../api/axiosFun.js"


//获取房屋类型
function get_type()
{
	let url = '/cms/house/get_type'
	return http.get(url).then(res=>{
		return res
	})
}

//添加房屋类型
function add_type(data)
{
	let url = '/cms/house/add_type'
	return http.post(url,data).then(res=>{
		return res
	})
}

//更新房屋类型
function update_type(data)
{
	let url = '/cms/house/update_type'
	return http.post(url,data).then(res=>{
		return res
	})
}

//删除房屋类型
function del_type(id)
{
	let url = '/cms/house/del_type?id='+id
	return http.put_show(url).then(res=>{
		return res
	})
}

//获取楼栋表
function get_project()
{
	let url = '/cms/house/get_project'
	return http.get(url).then(res=>{
		return res
	})
}

//添加楼栋表
function add_project(data)
{
	let url = '/cms/house/add_project'
	return http.post(url,data).then(res=>{
		return res
	})
}

//更新楼栋表
function update_project(data)
{
	let url = '/cms/house/update_project'
	return http.post(url,data).then(res=>{
		return res
	})
}

//删除楼栋表
function del_project(id)
{
	let url = '/cms/house/del_project?id='+id
	return http.put_show(url).then(res=>{
		return res
	})
}

//获取楼栋表
function get_project()
{
	let url = '/cms/house/get_project'
	return http.get(url).then(res=>{
		return res
	})
}

//获取房屋
function get_house()
{
	let url = '/cms/house/get_house'
	return http.get(url).then(res=>{
		return res
	})
}

//添加房屋
function add_house(data)
{
	let url = '/cms/house/add_house'
	return http.post(url,data).then(res=>{
		return res
	})
}

//更新房屋
function update_house(data)
{
	let url = '/cms/house/update_house'
	return http.post(url,data).then(res=>{
		return res
	})
}

//删除房屋
function del_house(id)
{
	let url = '/cms/house/del_house?id='+id
	return http.put_show(url).then(res=>{
		return res
	})
}

//坐标转换
function regeo(data)
{
	let url = '/cms/house/regeo'
	return http.post(url,data).then(res=>{
		return res
	})
}



export default{
	get_type,
	add_type,
	update_type,
	del_type,
	get_project,
	add_project,
	update_project,
	del_project,
	get_house,
	add_house,
	update_house,
	del_house,
	regeo
}